package com.blb.proxy2;

/**
 * 手机代理商
 */
public class CellphoneProxy implements CellphoneSales {
    //手机工厂的引用
    private CellphoneSales factory;

    //传入工厂对象

    public CellphoneProxy() {
        this.factory = factory;
    }

    @Override
    public void sell(String type) {
        //扩展被代理对象的方法
        System.out.println("给手机打广告了");
        factory.sell(type);
        System.out.println("给手机做售后");
    }
}
